package cn.com.JdbcFoundation;

import com.alibaba.druid.pool.DruidDataSourceFactory;

import javax.sql.DataSource;
import java.io.FileInputStream;
import java.sql.Connection;
import java.util.Properties;

public class DruidDemo {

    public static void main(String[] args) throws Exception {


        Properties prop = new Properties();
        prop.load(new FileInputStream("C:/git/java-fundamentals/src/druid.properties"));

        DataSource dataSource = DruidDataSourceFactory.createDataSource(prop);

        Connection con = dataSource.getConnection();
        System.out.println(con);
    }
}
